package io.wilson.rabbit.common.constant;

public interface RabbitMQConstant {
    /**
     * 直连型配置范例
     * <li> 队列与Exchange绑定，且要指定RoutingKey</li>
     * <li> 消息生产端向Exchange发送消息时，需指定消息的RoutingKey，消息会被绑定了该RoutingKey的所有队列消费</li>
     * <li> Exchange根据消息的RoutingKey判断，队列的RoutingKey与消息的RoutingKey完全一致才会收到消息</li>
     */
    String DIRECT_QUEUE_NAME_1 = "direct-demo-queue-1";
    String DIRECT_QUEUE_NAME_2 = "direct-demo-queue-2";
    String DIRECT_EXCHANGE_NAME = "direct-demo-exchange";
    String DIRECT_ROUTING_NAME = "direct-demo-routing";
    String SEQUENCE_DIRECT_EXCHANGE = "sequence-direct-exchange";
    String SEQUENCE_DIRECT_QUEUE = "sequence-direct-queue-";


    String QUEUE_NAME = "spring-boot-demo-queue";
    String EXCHANGE_NAME = "spring-boot-demo-exchange";
    String ROUTING_NAME = "spring-boot-demo-routing";
    String VOC_QUEUE_NAME = "voc-event-audited-queue";
    String VOC_EXCHANGE_NAME = "voc-box-update-exchange";


    /**
     * Topic：主题型
     * - RoutingKey可标识*(匹配.后一个单词的Topic)、.#(匹配多个词)通配符绑定队列。例：
     *   - a.*：能够匹配a.b、a.c、a.xxx队列让这些队列消费消息，但不能匹配a.a.a、a.b.c
     *   - a.item：
     * - 当发送消息时，会通过发送消息的RoutingKey与对应Exchange绑定队列的RoutingKey
     * 进行匹配，匹配到的队列都会消费消息。发送端或接收端的RoutingKey都可设置通配符，匹配上的队列都会消费
     */
    String TOPIC_QUEUE_NAME_1 = "topic-demo-queue.1";
    String TOPIC_QUEUE_NAME_2 = "topic-demo-queue.2";
    String TOPIC_QUEUE_NAME_3 = "topic-demo-queue.1.3";
    String TOPIC_EXCHANGE_NAME ="topic-demo-exchange";
    String TOPIC_ROUTING_ONE_PATTERN = "topic-demo-routing.*";
    String TOPIC_ROUTING_MORE_PATTERN = "topic-demo-routing.#";
    String TOPIC_ROUTING_KEY_A = "topic-demo-routing.1";
    String TOPIC_ROUTING_KEY_B = "topic-demo-routing.2";
    String TOPIC_ROUTING_KEY_C = "topic-demo-routing.1.3";
}
